/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	hey 
 * 
 * <p>描   述  :   DangerBridge.java for com.pengtu.gsj.entity.zhgl    </p>
 * 
 * <p>最后修改 : $: Sep 25, 2017-10:45:30 AM v 1.0.0	 hey   $ </p>
 * 
*/

package com.pengtu.gsj.entity.zhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;


/**
 * 
 * DangerBridge
 * 
 * Sep 25, 2017 10:45:30 AM
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name="T_ZH_DANGERBRIDGE")
public class DangerBridge extends IdEntity {
	
	private static final long serialVersionUID = 1779083837369820812L;

	private String testYear;				//年份
	private Integer originalBridge;			//原有危桥数量
	private Integer reOriginalBridge;		//原有危桥处置数量
	private Double  reOriginalPate;			//原有危桥处置率
	private Integer outOriginalBridge;		//原有危桥未列入计划
	
	private Integer addBridge;				//新增危桥
	private Integer reAddBridge;			//新增危桥处置数量
	private Double  reAddBridgePate;		//新增危桥处置率
	private Integer outAddBridge;			//新增危桥未列入计划
	
	private String remark;
	
	private Integer bulletinNumber;     	//检测文件数
	private List<Attachment> attachments;
	
	
	@Column(name = "TESTYEAR")
	public String getTestYear() {
		return testYear;
	}
	public void setTestYear(String testYear) {
		this.testYear = testYear;
	}
	@Column(name = "ORIGINALBRIDGE")
	public Integer getOriginalBridge() {
		return originalBridge;
	}
	public void setOriginalBridge(Integer originalBridge) {
		this.originalBridge = originalBridge;
	}
	@Column(name = "REORIGINALBRIDGE")
	public Integer getReOriginalBridge() {
		return reOriginalBridge;
	}
	public void setReOriginalBridge(Integer reOriginalBridge) {
		this.reOriginalBridge = reOriginalBridge;
	}
	@Column(name = "REORIGINALPATE")
	public Double getReOriginalPate() {
		return reOriginalPate;
	}
	public void setReOriginalPate(Double reOriginalPate) {
		this.reOriginalPate = reOriginalPate;
	}
	@Column(name = "OUTORIGINALBRIDGE")
	public Integer getOutOriginalBridge() {
		return outOriginalBridge;
	}
	public void setOutOriginalBridge(Integer outOriginalBridge) {
		this.outOriginalBridge = outOriginalBridge;
	}
	@Column(name = "ADDBRIDGE")
	public Integer getAddBridge() {
		return addBridge;
	}
	public void setAddBridge(Integer addBridge) {
		this.addBridge = addBridge;
	}
	@Column(name = "READDBRIDGE")
	public Integer getReAddBridge() {
		return reAddBridge;
	}
	public void setReAddBridge(Integer reAddBridge) {
		this.reAddBridge = reAddBridge;
	}
	@Column(name = "READDBRIDGEPATE")
	public Double getReAddBridgePate() {
		return reAddBridgePate;
	}
	public void setReAddBridgePate(Double reAddBridgePate) {
		this.reAddBridgePate = reAddBridgePate;
	}
	@Column(name = "OUTADDBRIDGE")
	public Integer getOutAddBridge() {
		return outAddBridge;
	}
	public void setOutAddBridge(Integer outAddBridge) {
		this.outAddBridge = outAddBridge;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
